 
<div class="mws-panel grid_8 mws-collapsible  quizzes">
  <div class="mws-panel-header">
     <span class="mws-i-24 i-table-1"><?php  echo __('Quiz'); ?></span>
   <div class="mws-collapse-button mws-inset"><span></span></div>
 </div>
<div class="mws-panel-body" style="display: block; direction:rtl;">
  <div class="right_direction"> 
  <table class="mws-table">
      <tbody>
		<tr><td class="left_header"><?php echo __('Id'); ?></td>
		<td>
			<?php echo h($quiz['Quiz']['id']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Title'); ?></td>
		<td>
			<?php echo h($quiz['Quiz']['title']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Quiz Type'); ?></td>
		<td>
			<?php echo h($quiz['Quiz']['quiz_type']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Start Date'); ?></td>
		<td>
			<?php echo h($quiz['Quiz']['start_date']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Study Level'); ?></td>
		<td>
			<?php echo $this->Html->link($quiz['StudyLevel']['title'], array('controller' => 'study_levels', 'action' => 'view', $quiz['StudyLevel']['id'])); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Lesson'); ?></td>
		<td>
			<?php echo $this->Html->link($quiz['Lesson']['title'], array('controller' => 'lessons', 'action' => 'view', $quiz['Lesson']['id'])); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Subject'); ?></td>
		<td>
			<?php echo $this->Html->link($quiz['Subject']['name'], array('controller' => 'subjects', 'action' => 'view', $quiz['Subject']['id'])); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Created'); ?></td>
		<td>
			<?php echo h($quiz['Quiz']['created']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Updated'); ?></td>
		<td>
			<?php echo h($quiz['Quiz']['updated']); ?>
			&nbsp;
		</td></tr>
	</tbody>
	</table>
</div>
</div>

<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Quiz'), array('action' => 'edit', $quiz['Quiz']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Quiz'), array('action' => 'delete', $quiz['Quiz']['id']), null, __('Are you sure you want to delete # %s?', $quiz['Quiz']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Quizzes'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Quiz'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Study Levels'), array('controller' => 'study_levels', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Study Level'), array('controller' => 'study_levels', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Lessons'), array('controller' => 'lessons', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Lesson'), array('controller' => 'lessons', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Subjects'), array('controller' => 'subjects', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Subject'), array('controller' => 'subjects', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Quiz Views'), array('controller' => 'quiz_views', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Quiz View'), array('controller' => 'quiz_views', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Questions'), array('controller' => 'questions', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Question'), array('controller' => 'questions', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Question Groups'), array('controller' => 'question_groups', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Question Group'), array('controller' => 'question_groups', 'action' => 'add')); ?> </li>
	</ul>
</div>
	<div class="related">
		<h3><?php echo __('Related Quiz Views'); ?></h3>
	<?php if (!empty($quiz['QuizView'])): ?>
		<dl>
			<dt><?php echo __('Id'); ?></dt>
		<dd>
	<?php echo $quiz['QuizView']['id']; ?>
&nbsp;</dd>
		<dt><?php echo __('Skill Id'); ?></dt>
		<dd>
	<?php echo $quiz['QuizView']['skill_id']; ?>
&nbsp;</dd>
		<dt><?php echo __('Quiz Id'); ?></dt>
		<dd>
	<?php echo $quiz['QuizView']['quiz_id']; ?>
&nbsp;</dd>
		<dt><?php echo __('Question Number'); ?></dt>
		<dd>
	<?php echo $quiz['QuizView']['question_number']; ?>
&nbsp;</dd>
		<dt><?php echo __('Created'); ?></dt>
		<dd>
	<?php echo $quiz['QuizView']['created']; ?>
&nbsp;</dd>
		<dt><?php echo __('Updated'); ?></dt>
		<dd>
	<?php echo $quiz['QuizView']['updated']; ?>
&nbsp;</dd>
		</dl>
	<?php endif; ?>
		<div class="actions">
			<ul>
				<li><?php echo $this->Html->link(__('Edit Quiz View'), array('controller' => 'quiz_views', 'action' => 'edit', $quiz['QuizView']['id'])); ?></li>
			</ul>
		</div>
	</div>
	<div class="related">
	<h3><?php echo __('Related Questions'); ?></h3>
	<?php if (!empty($quiz['Question'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Body'); ?></th>
		<th><?php echo __('Image'); ?></th>
		<th><?php echo __('Question Type'); ?></th>
		<th><?php echo __('Points'); ?></th>
		<th><?php echo __('Question Group Id'); ?></th>
		<th><?php echo __('Study Level Id'); ?></th>
		<th><?php echo __('Lesson Id'); ?></th>
		<th><?php echo __('Subject Id'); ?></th>
		<th><?php echo __('Quiz Id'); ?></th>
		<th><?php echo __('Display Order'); ?></th>
		<th><?php echo __('Active'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($quiz['Question'] as $question): ?>
		<tr>
			<td><?php echo $question['id']; ?></td>
			<td><?php echo $question['body']; ?></td>
			<td><?php echo $question['image']; ?></td>
			<td><?php echo $question['question_type']; ?></td>
			<td><?php echo $question['points']; ?></td>
			<td><?php echo $question['question_group_id']; ?></td>
			<td><?php echo $question['study_level_id']; ?></td>
			<td><?php echo $question['lesson_id']; ?></td>
			<td><?php echo $question['subject_id']; ?></td>
			<td><?php echo $question['quiz_id']; ?></td>
			<td><?php echo $question['display_order']; ?></td>
			<td><?php echo $question['active']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'questions', 'action' => 'view', $question['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'questions', 'action' => 'edit', $question['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'questions', 'action' => 'delete', $question['id']), null, __('Are you sure you want to delete # %s?', $question['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Question'), array('controller' => 'questions', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Question Groups'); ?></h3>
	<?php if (!empty($quiz['QuestionGroup'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Body'); ?></th>
		<th><?php echo __('Image'); ?></th>
		<th><?php echo __('Study Level Id'); ?></th>
		<th><?php echo __('Lesson Id'); ?></th>
		<th><?php echo __('Subject Id'); ?></th>
		<th><?php echo __('Quiz Id'); ?></th>
		<th><?php echo __('Display Order'); ?></th>
		<th><?php echo __('Active'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($quiz['QuestionGroup'] as $questionGroup): ?>
		<tr>
			<td><?php echo $questionGroup['id']; ?></td>
			<td><?php echo $questionGroup['body']; ?></td>
			<td><?php echo $questionGroup['image']; ?></td>
			<td><?php echo $questionGroup['study_level_id']; ?></td>
			<td><?php echo $questionGroup['lesson_id']; ?></td>
			<td><?php echo $questionGroup['subject_id']; ?></td>
			<td><?php echo $questionGroup['quiz_id']; ?></td>
			<td><?php echo $questionGroup['display_order']; ?></td>
			<td><?php echo $questionGroup['active']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'question_groups', 'action' => 'view', $questionGroup['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'question_groups', 'action' => 'edit', $questionGroup['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'question_groups', 'action' => 'delete', $questionGroup['id']), null, __('Are you sure you want to delete # %s?', $questionGroup['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Question Group'), array('controller' => 'question_groups', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
